﻿/*
Copyright (c) 2010 Lance Ward
This software is licensed under the MIT license, except where otherwise noted.
For complete license details, refer to license.txt
*/

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ADN
{
	public partial class FormRender : Form
	{

		public int StartFrame
		{
			get { return (int)spinStartFrame.Value; }
			set { spinStartFrame.Value = value; }
		}

		public int EndFrame
		{
			get { return (int)spinEndFrame.Value; }
			set { spinEndFrame.Value = value; }
		}

		public Size Resolution
		{
			get { return new Size((int)spinWidth.Value, (int)spinHeight.Value); }
			set 
			{
				spinWidth.Value = value.Width;
				spinHeight.Value = value.Height; 
			}
		}

		public string OutputDirectory
		{
			get { return txtOutputDir.Text; }
			set { txtOutputDir.Text = value; }
		}

		public bool KeepLayers
		{
			get { return chkKeepLayers.Checked; }
			set { chkKeepLayers.Checked = value; }
		}

		public FormRender()
		{
			InitializeComponent();
		}

		private void FormRender_Load(object sender, EventArgs e)
		{
			cmboFormat.Text = "PNG";
			cmboQuality.Text = "Production";
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			this.Close();
		}

		private void btnRender_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.OK;
			this.Close();
		}
	}
}
